package com.yc.system.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yc.system.dto.ChangeOrder;
import com.yc.system.dto.OrderDto;
import com.yc.system.entity.BookCartLike;
import com.yc.system.entity.BookOrder;
import com.yc.framework.baseClass.BaseService;
import com.yc.framework.baseClass.R;

import java.util.List;

/**
 * <p>
 * 订单交易 服务类
 * </p>
 *
 * @author 1850140986@qq.com
 * @since 2022-12-06
 */
public interface IBookOrderService extends BaseService<BookOrder> {

 /**
    * 分页查询实体列表
    * @param model 查询参数
    * @return 查询结果
    */
  R list( BookOrder model);

      /**
      * 根据主键删除实体对象，返回值封装成R，若成功则会把要删除的主键计入返回的R
      *
      * @param id 主键
      * @return 删除是否成功
      */
      R removeModelById(String id);


    List<BookOrder> getOrderListByIssureId(int userId);

    int getCountByIssureId(int userId);

    int getGoodNumByIssureId(int userId);

    R getOrderListByUserId(int userId);

    R getOrderListByIssuerId(int ssuerId);

    R addOrder(BookOrder bookOrder);

    R updataOrder(BookOrder bookOrder);

    R getOrderListByPageUserId(BookOrder findByPage);

    R getOrders(OrderDto orderDto);

    R changeOrderStatus(OrderDto orderDto);

    R addOrdersByCart(List<BookCartLike> orderDto);

    R changeOrder(ChangeOrder changeOrder);

    R getissuerInfoByOrderId(int orderId);

    R getCustomerInfoByOrderId(int orderId);
}
